<?php
/* @var $this SiteController */


$this->pageTitle=Yii::app()->name . ' - Register';
$this->breadcrumbs=array(
	'Register',
);
?>
<div id="wrapper">
<div class="register_form">
<h1>Register User</h1>
<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'register-form',
	'enableAjaxValidation'=>false,
)); ?>
     <table style="margin-left:55px;">
	<tr><td colspan ="2"><p class="note">Fields with <span class="required">*</span> are required.</p></td></tr>

	<?php echo $form->errorSummary($model); ?>
       
         <tr>
		<td><?php echo $form->labelEx($model,'use_username'); ?></td>
		<td><?php echo $form->textField($model,'use_username',array('size'=>32,'maxlength'=>32)); ?></td>
         </tr>
         <tr><td><?php echo $form->error($model,'use_username'); ?></td></tr>
        
         <tr>
		<td><?php echo $form->labelEx($model,'use_email'); ?></td>
		<td><?php echo $form->textField($model,'use_email',array('size'=>32,'maxlength'=>128)); ?></td>
	</tr>
       <tr><td><?php echo $form->error($model,'use_email'); ?></td></tr>
       
        <tr>
		<td><?php echo $form->labelEx($model,'use_password'); ?></td>
		<td><?php echo $form->passwordField($model,'use_password',array('size'=>32,'maxlength'=>32)); ?></td>
	</tr>
        <tr><td><?php echo $form->error($model,'use_password'); ?></td></tr>
        
        <tr>
            <td><?php echo $form->label($model,'use_password_repeat'); ?></td>
            <td><?php echo $form->passwordField($model,'use_password_repeat',array('size'=>32,'maxlength'=>32)); ?></td>
        </tr>
         <tr><td><?php echo $form->error($model,'use_password_repeat'); ?></td></tr>
        
        <?php if(CCaptcha::checkRequirements()): ?>
        <tr><td colspan="2">
            <?php echo $form->labelEx($model,'verifyCode'); ?>
		<div>
		<?php $this->widget('CCaptcha', array('buttonLabel' => "Refesh", 'showRefreshButton' => false, 'clickableImage' => true)); ?>
                 <br/>
		<?php echo $form->textField($model,'verifyCode'); ?>
		</div>
            <div class="hint">Nhập các ký tự như trong hình trên.<br/>
                Nếu nhìn không rõ bạn có thể click vào hình để refresh.</div>
		<?php echo $form->error($model,'verifyCode'); ?>
            </td>
        </tr>
	<?php endif; ?>
        
        <tr><td colspan="2">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Sign Up' : 'Save'); ?>
            </td></tr>
        

<?php $this->endWidget(); ?>
</table>
</div><!-- form -->
</div>
    </div>